import { h, defineComponent } from 'vue';

//虚拟节点渲染组件
export default defineComponent({
  props: {
    content: {
      type: [Object, String],
    },
  },
  render() {
    if (typeof this.content === 'string') {
      return this.content;
    } else {
      return h(this.content?.type, this.content?.props, this.content?.children);
    }
  },
});
